<?php
function hfr_template_admin() {
?>
	<div class="hfr-content">
		<?php include ('admin/header.php');?>
		<?php include ('admin/content.php');?>
		<?php include ('admin/footer.php');?>
	</div>
	<?php
	echo ob_get_clean();
}

function hfr_template_add_options_link() {
	add_menu_page('Hatforrent Management', 'Hatforrent Template', 'manage_options', 'hfr_template', 'hfr_template_admin', "image/abc.jpg");
	$page1 = add_submenu_page('hfr_template', 'Hatforrent Plugin Overview', 'Overview', 'manage_options', 'hfr_template', 'hfr_template_admin');
	$page2 = add_submenu_page('hfr_template', 'Hatforrent Plugin Config', 'Setup', 'manage_options', 'hfr_template_setup', 'hfr_template_admin');
	$page3 = add_submenu_page("hfr_template", 'Source Manager', 'Source Manager', 'manage_options', 'hfr_template_source_manager', 'hfr_template_admin');
	$page4 = add_submenu_page("hfr_template", 'Add Source', 'Add Source', 'manage_options', 'hfr_template_source_manager&act=new', 'hfr_template_admin');
	$page5 = add_submenu_page("hfr_template", 'Payment', 'Payment', 'manage_options', 'hfr_template_payment', 'hfr_template_admin');
	$page6 = add_submenu_page("hfr_template", 'Contact', 'Contact', 'manage_options', 'hfr_template_contact', 'hfr_template_admin');
	
	
	add_action('admin_print_scripts', 'hfr_template_load_scripts');
	add_action('admin_print_scripts-' . $page1, 'hfr_template_load_overview_scripts');
	add_action('admin_print_scripts-' . $page2, 'hfr_template_load_setup_scripts');
	add_action('admin_print_scripts-' . $page3, 'hfr_template_load_source_manager_scripts');
	add_action('admin_print_scripts-' . $page4, 'hfr_template_load_add_source_scripts');
	add_action('admin_print_scripts-' . $page5, 'hfr_template_load_payment_scripts');
	add_action('admin_print_scripts-' . $page6, 'hfr_template_load_contact_scripts');
}

function hfr_template_load_scripts() {
	wp_enqueue_style('hfr-template-styles1', plugin_dir_url( __FILE__ ) . 'assets/css/hfr-styles.css');
	wp_enqueue_style('hfr-template-styles2', plugin_dir_url( __FILE__ ) . 'assets/css/hfr-bootstrap.css');
	wp_enqueue_script('hft-template-script1', plugin_dir_url( __FILE__ ) . 'assets/js/hfr-bootstrap.js', array('jquery','jquery-ui-core','jquery-ui-sortable', 'jquery-ui-dialog','jquery-ui-tabs'));
}

function hfr_template_load_overview_scripts() {
	
}

function hfr_template_load_setup_scripts() {
	
}

function hfr_template_load_source_manager_scripts() {
	
}

function hfr_template_load_add_source_scripts() {
}

function hfr_template_load_payment_scripts() {
	
}

function hfr_template_load_contact_scripts() {
	
}

add_action('init', 'hfr_template_do_output_buffer');
function hfr_template_do_output_buffer() {
        ob_start();
}
add_action('admin_menu', 'hfr_template_add_options_link');